//
//  LLCustomBtn.h
//  OneMeeting
//
//  Created by zhangheng on 2019/8/5.
//  Copyright © 2019 www.zhangheng.com. All rights reserved.
//

#import <Cocoa/Cocoa.h>

typedef enum {
    
    LLRectCornerTopLeft     = 1 << 0,
    LLRectCornerTopRight    = 1 << 1,
    LLRectCornerBottomLeft  = 1 << 2,
    LLRectCornerBottomRight = 1 << 3,
    LLRectCornerAllCorners  = ~0UL
} LLRectCorner;

typedef enum {
    
    LLTextAlignmentLeft  = 0, //左对齐
    LLTextAlignmentCenter,    //居中
    LLTextAlignmentRight      //右对齐
    
}LLTextAlignment;

typedef enum {
    
    LLTextUnderLineStyleNone  = 0,     //无下划线
    LLTextUnderLineStyleSingle,        //单下划线
    LLTextUnderLineStyleDouble,        //双下划线
    LLTextUnderLineStyleDeleteSingle,  //单删除线
    LLTextUnderLineStyleDeleteDouble   //双删除线
    
}LLTextUnderLineStyle;

@interface LLCustomBtn : NSView

@property (nullable, weak) id target;
@property (nullable) SEL action;

///当鼠标移动到控件时，是否显示"小手"
@property (nonatomic, assign) BOOL isHandCursor;

///圆角
@property (nonatomic, assign) CGFloat radius;
@property (nonatomic, assign) LLRectCorner rectCorners;

///按钮文字
@property (nonatomic, nullable, strong) NSString *defaultTitle;
@property (nonatomic, nullable, strong) NSString *selectedTitle;

///按钮文字对齐方式
@property (nonatomic, assign) LLTextAlignment textAlignment;

///按钮文字下划线样式
@property (nonatomic, assign) LLTextUnderLineStyle textUnderLineStyle;

///按钮文字颜色
@property (nonatomic, nullable, strong) NSColor  *defaultTitleColor;
@property (nonatomic, nullable, strong) NSColor  *selectedTitleColor;
@property (nonatomic, nullable, strong) NSColor  *highLightTitleColor;

///边框宽度
@property (nonatomic, readwrite) CGFloat  defaultBoardWidth;
@property (nonatomic, readwrite) CGFloat  selectedBoardWidth;

///边框颜色
@property (nonatomic, nullable, strong) NSColor  *defaultBoardColor;
@property (nonatomic, nullable, strong) NSColor  *selectBoardColor;

///按钮字体
@property (nonatomic, nullable, strong) NSFont   *defaultFont;
@property (nonatomic, nullable, strong) NSFont   *selectedFont;

///当背景图片存在时，背景色无效
@property (nonatomic, nullable, strong) NSImage  *defaultBackgroundImage;
@property (nonatomic, nullable, strong) NSImage  *selectedBackgroundImage;

///当背景图片不存在时，显示背景色
@property (nonatomic, nullable, strong) NSColor  *defaultBackgroundColor;
@property (nonatomic, nullable, strong) NSColor  *selectedBackgroundColor;

//复写tag
@property (nonatomic, readwrite) NSInteger tag;

//选中状态
@property (nonatomic,assign) BOOL isSelect;
    
@end
